package com.lej.dataservice.club.bean.rank

import com.lej.core.common.RankLockStatus
import com.lej.core.provider.resourceProvider
import com.lej.dataservice.club.http.BaseListBean
import com.lej.core.utils.extention.safe
import com.lej.dataservice.club.bean.TipsBean
import com.lej.dataservice.club.bean.userinfo.Ranking

data class RankBean(
    val st_ai_score: String = "0",
    val photo_url: String,// https://mini01.jiuyan.info/2_1_956_20200526_22522660.jpg?imageslim",
    val uid: String,//= 56
    val nick: String,//= 娄轩轩",
    val birth: String,//= 950544000",
    val gender: String,//= ,
    val college: String,//= 杭州师范大学钱江学院",
    val occupation: String,//= 模特",
    val courses: String,//= 社会体育指导与管理",
    val graduate: String,//= ,
    val age: String,//= 0
    val r: Int,//= 0
    val type: Int,//= 参数存在且为1时 展示“你可能还感兴趣”
    val rankings: List<Ranking>, //感兴趣 列表

    ///battle 相关大于0 代表有
    var battle_id: String
) {
    fun graduateStr() =  resourceProvider.getGraduateStatusStr(graduate.toIntOrNull())
    fun isInBattle() = battle_id.toIntOrNull().safe(0) != 0
}

data class RankListRes(
    var tagid: String,
    var cardid: String,
    var cardname: String,
    var cardsubname: String,
    /**当前用户是否已经解锁过此榜单0未解锁 1已解锁*/
    @RankLockStatus
    var lock_status: Int,
    /**用户所在排名*/
    var index: Int,
    ///什么是真颜排行榜文案
    var whats_ai: TipsBean
) : BaseListBean<RankBean>()
